<template>
    <view class="main">
        <view class="middleData">
            <view class="flexBox" style="height: 128rpx">
                <view class="loginLeftMsg">头像</view>
                <view style="height: 84rpx; weight: 84rpx; margin-top: 22rpx">
                    <image src="../../assets/images/我要发货/头像/32pt.png" style="height: 64rpx;width: 68rpx;" />
                </view>
            </view>
            <view class="flexBox">
                <view class="loginLeftMsg">姓名</view>
                <view class="rightMsg">{{ personalData.btsName }}</view>
            </view>
            <view class="flexBox">
                <view class="loginLeftMsg">职称</view>
                <view class="rightMsg">值班员</view>
            </view>
            <view class="flexBox">
                <view class="loginLeftMsg">联系方式</view>
                <view class="rightMsg">{{ personalData.phone }}</view>
            </view>
            <view class="flexBox">
                <view class="loginLeftMsg">工号</view>
                <view class="rightMsg">{{ personalData.staffNo }}</view>
            </view>
            <view class="flexBox">
                <view class="loginLeftMsg">密码</view>
                <view class="rightMsg">{{ personalData.loginPassword }}</view>
            </view>
        </view>
        <view class="outLogin" @click="loginOut">退出登录</view>
    </view>
</template>
<script lang="ts" setup>
import useUserStore from '@/store/user';
import Taro, { useReady }from '@tarojs/taro';

useReady(() => {
    Taro.setNavigationBarTitle({
        title: '个人信息'
    })
})

const userStore = useUserStore()

const personalData = userStore.btStaff

function loginOut() {
    userStore.btStaff = {}
    userStore.btsId = ''
    userStore.token = ''

    Taro.navigateTo({
        url: '../login/index'
    })
}
</script>
<style lang="scss">
.outLogin {
    background: #f4f5f6;
    border-radius: 88rpx;
    height: 88rpx;
    text-align: center;
    line-height: 88rpx;
    width: 100%;
    font-family: "PingFang SC";
    font-style: normal;
    font-weight: 400;
    font-size: 32rpx;
    color: #252525;
    margin-left: 40rpx;
    margin-top: 100rpx;
    width: 670rpx;
    box-sizing: border-box;
}

.rightMsg {
    font-family: "PingFang SC";
    font-style: normal;
    font-weight: 400;
    font-size: 28rpx;

    color: #999999;
}

.loginLeftMsg {
    font-family: "PingFang SC";
    font-style: normal;
    font-weight: 400;
    font-size: 28rpx;
}

.flexBox {
    display: flex;
    justify-content: space-between;
    height: 128rpx;
    line-height: 128rpx;
}

.main {
    height: 100%;
    background: white;
}

.middleData {
    padding-left: 24rpx;
    padding-right: 24rpx;
    box-sizing: border-box;
}

.topBack {
    height: 88rpx;
    box-sizing: border-box;
    padding-left: 32rpx;
    padding-right: 32rpx;
}
</style>